<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/public/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>资质管理</title>
<%
	request.setAttribute("menu", 1);
%>
<%@ include file="/WEB-INF/page/public/contentmeta.jsp"%>
<link rel="stylesheet" href="<%=basePath%>css/global.css" media="all" />
<link rel="stylesheet" href="<%=basePath%>plugins/font-awesome/css/font-awesome.min.css" media="all">
<link rel="stylesheet" href="<%=basePath%>css/system.css" media="all">
<link rel="stylesheet" href="<%=basePath%>css/tab.css" media="all" />
<style type="text/css">
.layui-form-label i {
	color: red;
	padding-right: 3px;
}
.htlayui-disabled, .htlayui-disabled:hover {
    color: black;
    background-color:#e4e4e4;
    cursor: not-allowed;
}
</style>

</head>
<body>

	<input type="hidden" id="successlog" value="${successlog}">
	<input type="hidden" value="${customertype}" id="customertype">

  
				<div class="admin-tab admin-user">
					<div class="tab-condition">

						 <form class="layui-form clefix customersearcheform" action="/customer/qualificationuserhistorylist" method="post" id="customerlistform">
    
    	<!-- 只有在state!=4的情况下才会显示搜索框，个人比企业多一个身份证 -->
    	
   		<div class="layui-form-item">
			<div class="layui-input-block">
				<input type="text" name="keyWord" id="keyWord" lay-verify="title" autocomplete="off" placeholder="输入关键词后搜索" class="layui-input" value="${pager.params.KeyWord}" >
			</div>
	   </div>	
	   	<div class="layui-form-item">	
			 <div class="layui-input-inline">
	                   <select name="quid" id="quid">
	                       <option value="">聘用状态</option>
	                       	<option value="-1">全部</option>
	                       <option value="0"   <c:if test="${pager.params.quid==0}">selected</c:if>>未聘</option>
	                       <option value="1"   <c:if test="${pager.params.quid==1}">selected</c:if>>已聘</option>
	                   </select>  
	         </div>
		</div>
		<div class="layui-form-item">	
			 <div class="layui-input-inline">
	                   <select name="source" id="source">
	                       <option value="">客户来源</option>
	                       <option value="0">全部</option>
	                       <dic:cf type="2" name="customer_source" value="${pager.params.source}"/>
	                   </select>
	         </div>
		</div>
	 
		<div class="layui-form-item">
			<input name="skipToPage" id="skipToPage"  type="hidden" value="${pager.pageNo}">
			<input type="hidden" id="pageNo" name="pageNo" value="${pager.pageNo}">
			<input type="hidden" id="totalPage" name="totalPage" value="${pager.totalPages}">
			<input type="hidden" value="${param.id}"       id="cusid" name="id">
			<input type="hidden" value="${param.contractid}"       id="contractid" name="contractid">
			 <input type="hidden" value="${param.owner}"       id="owner" name="owner">
			<button class="layui-btn customersearchbtn" lay-submit="" lay-filter="searchform"><i class="layui-icon layui-unselect layui-tab-close">&#xe615;<!-- &#xe642; --></i>搜索人员</button>
			<button class="layui-btn searchbtnclean" type="button" lay-submit="" lay-filter="searchform">清空搜索</button>
		</div>
	</form>
	
					    <div class="TM-tab-info"> 
					        <c:if test="${param.owner==1}">
							<a class="layui-btn layui-btn-primary layui-btn-small  tjrybtn"><i class="layui-icon">&#xe654;</i>聘用人员</a> </c:if>
							<a class="layui-btn layui-btn-primary layui-btn-small  refreshbtn"><i class="layui-icon">&#x1002;</i>3刷新</a>
						</div>
					</div>
					<div class="layui-field-box">
						<table class="site-table table-hover TM-table-news">
							<thead>
							<tr>
								<th style="width:8%;">人员</th>
								<th style="width:10%;">证书及专业</th>
								<th style="width:10%;">地区</th>
								<th style="width:10%;">状态</th>
								<th style="width:15%;">聘用单位</th>
								<th style="width:15%;">聘用时间</th>
								<th style="width:15%;">到期时间</th>
								<th style="width:5%;">所属人</th>
							</tr>
							</thead>
							<tbody>
							<c:forEach var="obj" items="${pager.resultList}" varStatus="o1">
							   <tr>
									<td>${obj.cname}</td>
								
									<td>
										${obj.technicalpost}
									</td>
								   <td>${obj.address} </td>
									<td >
									     <c:if test="${obj.quid==null}"><font color="red">未聘用</font></c:if>
									     <c:if test="${obj.quid!=null}"><font color="green">已聘用</font></c:if> 
									</td>
									<td>${obj.qyname} </td>
									 <td><c:if test="${obj.quid!=null}">${obj.createdate.substring(0,10)} </c:if>  <c:if test="${obj.quid==null}">暂无</c:if>     </td>
									  <td><c:if test="${obj.endtime!=null&&obj.endtime!=''}">${obj.endtime.substring(0,10)} </c:if>  </td>
									 <td>${obj.createusersname} </td>
								</tr>
							</c:forEach>
							</tbody>
						</table>
					 
				 
						<div class="admin-table-page">
							<div class="page">
								<div class="layui-laypage">
									<span class="layui-laypage-total"><button type="button"
											class="layui-laypage-btn">共${pager.totalSize}条记录</button></span>
								</div>
							</div>
						</div>
						<div class="admin-table-page">
							<div id="page" class="page"></div>
						</div>

					</div>
				</div>
 
 
<!-- 添加证书弹框 -->
	<div id="TM-layui-zhengshu" style="display: none;">
		<div class="tab-condition" style="margin-left: 35px;">
			<form class="layui-form clefix" action="" id="zssearch">
				<div class="layui-form-item">
					<div class="layui-input-block">
						<input type="text" name="keyWord" id="zskeyword"
							autocomplete="off" placeholder="请输入关键字" class="layui-input">
						 <input type="hidden" id="skpg" name="skipToPage" value="1">
					</div>
				</div>
				<div class="layui-form-item">
				<div class="layui-input-inline ">
					 <select name="uid"  id="seluid"  lay-search>
                    	<option value="">请选择用户</option>
                    	<option value="-1" <c:if test="${ -1 == pager.params.uid }">selected</c:if> >全部</option>
                    	<c:forEach var="nameobj" items="${userlist}">
                    		<option value="${nameobj.uid}" <c:if test="${ nameobj.uid == pager.params.uid }">selected</c:if> >${nameobj.name}</option>
                    	</c:forEach>
                    </select>
				</div> 
				</div>  
				<div class="layui-form-item">
		            <div class="layui-input-inline">
		                   <select name="source" id="source">
		                       <option value="">客户来源</option>
		                       <option value="0">全部</option>
		                       <dic:cf type="2" name="customer_source" value="${cuinfo.source}"/>
		                   </select>
		             </div>
			  </div> 
				<div class="layui-form-item">
					<button class="layui-btn TM-btn-search zssearchbtn" type="button">
						<i class="layui-icon layui-unselect layui-tab-close">&#xe615;</i>搜索
					</button>
					<button class="layui-btn TM-btn-search zscleanbtn" type="button">
						<i class="layui-icon layui-unselect layui-tab-close">&#xe615;</i>清空
					</button>
				</div>
			</form>
		</div>
		<div class="entering">
			<table class="site-table table-hover TM-table3"
				style="width: 99%; margin: 0 auto;">
				<thead>
					<tr>
						<th style="width: 122px;">姓名</th>
						<th style="width: 100px;">证书及专业</th>
						<th style="width: 171px;">地区</th>
						<th style="width: 171px;">聘用企业</th>
						<th style="width: 172px;">所属人</th>
						<th style="width: 101px;">操作</th>
					</tr>
				</thead>
				<tbody class="tb_customerzs">
				</tbody>
			</table>
			<div class="admin-table-page">
				<div id="zspage" class="page zspage"></div>
			</div>
		</div>
	</div>
	
	 
    <div class="addlgjjl"  style="display: none;">
    	<form class="layui-form" id="tjlxjlForm" action="">
	      <div class="layui-form-item address" style="margin-top:10px">
	            <label class="layui-form-label">跟进内容：</label>
	            <div class="layui-input-block" style="width:60%">
	            	 <textarea id="remark" name="remark" placeholder="请输入内容" class="layui-textarea"></textarea>
	            </div>
	        </div>
	    </form>
    </div>
  

	<script id="zslb" type="text/html"> 
{{#  layui.each(d.resultList, function(index, item){ }} 
<tr  >
		                <td>{{item.cname}}</td>
						<td>{{# if(item.technicalpost==null){ }} {{#  } else { }}  {{item.technicalpost}} {{#  } }} </td>
						<td>{{# if(item.address==null){ }} {{#  } else { }}  {{item.address}} {{#  } }}</td>
                         <td>{{# if(item.qyname==null){ }} {{#  } else { }}  {{item.qyname}} {{#  } }}</td>
		                <td>{{item.createusersname}} </td>
		                <td>
							{{# if(item.quid==null){ }} 
  								<button class="layui-btn  layui-btn-small addzs" data="{'id':'{{item.id}}','uid':'{{item.uid}}','name':'{{item.cname}}','createname':'{{item.createusersname}}','advancemoney':'{{item.advancemoney}}'}"   type="button">聘用<i class="layui-icon"></i></button>
							{{#  } else { }} 
	 						    <button class="layui-btn layui-btn-danger layui-btn-small jpbtn" data="{{item.quid}}"   type="button">解聘<i class="layui-icon"></i></button>
							 {{#  } }} 
		                </td>
	               	</tr>
 
{{#  }); }}  
</script>

 
 
	<script type="text/javascript" src="<%=basePath%>js/customeruserlist.js?v=<%=callcenterstate%>35"></script>
	<script type="text/javascript">
	 
	</script>
</body>
</html>